<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪元素选择器</title>

    <style>

        .box {
            width: 200px;
            height: 200px;
            background-color: pink;
        }

        .box::before {
            /* content是必须写的 */
            content: 'before';
        }

        .box::after {
            content: 'after';
        }

    </style>

</head>
<body>
    
    <img src="伪元素选择器.png" alt="">
    <br>
    <br>

    <div class="box"> 哈 </div>

</body>
</html>